package jpa.entitys.promis.construction;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the VARIATION_ORDER_INSTALLMENT database table.
 * 
 */
@Embeddable
public class VariationOrderInstallmentPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	private String company;

	private String project;

	@Column(name="VARIATION_ORDER_TYPE")
	private String variationOrderType;

	@Column(name="VARIATION_ORDER_SERIES")
	private String variationOrderSeries;

	@Column(name="VARIATION_ORDER_NO")
	private long variationOrderNo;

	private long seq;

	@Column(name="INSTALLMENT_NUMBER")
	private long installmentNumber;

    public VariationOrderInstallmentPK() {
    }
	public String getCompany() {
		return this.company;
	}
	public void setCompany(String company) {
		this.company = company;
	}
	public String getProject() {
		return this.project;
	}
	public void setProject(String project) {
		this.project = project;
	}
	public String getVariationOrderType() {
		return this.variationOrderType;
	}
	public void setVariationOrderType(String variationOrderType) {
		this.variationOrderType = variationOrderType;
	}
	public String getVariationOrderSeries() {
		return this.variationOrderSeries;
	}
	public void setVariationOrderSeries(String variationOrderSeries) {
		this.variationOrderSeries = variationOrderSeries;
	}
	public long getVariationOrderNo() {
		return this.variationOrderNo;
	}
	public void setVariationOrderNo(long variationOrderNo) {
		this.variationOrderNo = variationOrderNo;
	}
	public long getSeq() {
		return this.seq;
	}
	public void setSeq(long seq) {
		this.seq = seq;
	}
	public long getInstallmentNumber() {
		return this.installmentNumber;
	}
	public void setInstallmentNumber(long installmentNumber) {
		this.installmentNumber = installmentNumber;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof VariationOrderInstallmentPK)) {
			return false;
		}
		VariationOrderInstallmentPK castOther = (VariationOrderInstallmentPK)other;
		return 
			this.company.equals(castOther.company)
			&& this.project.equals(castOther.project)
			&& this.variationOrderType.equals(castOther.variationOrderType)
			&& this.variationOrderSeries.equals(castOther.variationOrderSeries)
			&& (this.variationOrderNo == castOther.variationOrderNo)
			&& (this.seq == castOther.seq)
			&& (this.installmentNumber == castOther.installmentNumber);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.company.hashCode();
		hash = hash * prime + this.project.hashCode();
		hash = hash * prime + this.variationOrderType.hashCode();
		hash = hash * prime + this.variationOrderSeries.hashCode();
		hash = hash * prime + ((int) (this.variationOrderNo ^ (this.variationOrderNo >>> 32)));
		hash = hash * prime + ((int) (this.seq ^ (this.seq >>> 32)));
		hash = hash * prime + ((int) (this.installmentNumber ^ (this.installmentNumber >>> 32)));
		
		return hash;
    }
}